{extend name="public:base" /}
{block name="content"}
<div class="page-header">
	<h1>
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	</h1>
</div>
<div class="row">
	<div class="col-xs-12">	
		<div class="form-horizontal">	
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">电脑端LOGO </label>
			<div class="col-sm-10">
				 <div>
		                  <a href="#" id="pc_logo" data-toggle="image" class="img-thumbnail">
		                  	<img {if condition="$common['PC_LOGO']['value']"} 
								src="/<?php echo resize($common['PC_LOGO']['value'],100,100); ?>" 
								{else /}  
								src="__PUBLIC__/image/no_image_100x100.jpg" 
								{/if}  />
								</a>
		                  <input type="hidden" name="PC_LOGO" value="{$common.PC_LOGO.value|default=''}" id="pc-logo-image" />
		         </div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">手机端LOGO </label>
			<div class="col-sm-10">
				 <div>
		                  <a href="#" id="mobile_logo" data-toggle="image" class="img-thumbnail">
		                  	<img {if condition="$common['MOBILE_LOGO']['value']"} 
								src="/<?php echo resize($common['MOBILE_LOGO']['value'],100,100); ?>" 
								{else /}  
								src="__PUBLIC__/image/no_image_100x100.jpg" 
								{/if}  />
								</a>
		                  <input type="hidden" name="MOBILE_LOGO" value="{$common.MOBILE_LOGO.value|default=''}" id="mobile-logo-image" />
		         </div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">网站ICON </label>
			<div class="col-sm-10">
				 <div id="thumb">
		                  <a href="#" id="thumb-icon" data-toggle="image" class="img-thumbnail">
		                  	<img {if condition="$common['SITE_ICON']['value']"} 
								src="/<?php echo resize($common['SITE_ICON']['value'],100,100); ?>" 
								{else /}  
								src="__PUBLIC__/image/no_image_40x40.jpg" 
								{/if}  />
								</a>
		                  <input type="hidden" name="SITE_ICON" value="{$common.SITE_ICON.value|default=''}" id="input-image" />
		            </div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">二维码 </label>
			<div class="col-sm-10">
				 <div>
		                  <a href="#" id="qrcode" data-toggle="image" class="img-thumbnail">
		                  	<img {if condition="$common['qrcode']['value']"} 
								src="/<?php echo resize($common['qrcode']['value'],100,100); ?>" 
								{else /}  
								src="__PUBLIC__/image/no_image_100x100.jpg" 
								{/if}  />
								</a>
		                  <input type="hidden" name="qrcode" value="{$common.qrcode.value|default=''}" id="qrcode-image" />
		         </div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">网站标题 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="SITE_TITLE" class="col-xs-10 col-sm-10 form-control"  value="{$common.SITE_TITLE.value|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">网站名称 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="SITE_NAME" class="col-xs-10 col-sm-10 form-control"  value="{$common.SITE_NAME.value|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">网站描述 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<textarea name="SITE_DESCRIPTION" id="input-meta-description2" class="form-control" rows="5" >{$common.SITE_DESCRIPTION.value|default=''}</textarea>
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">网站关键字 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="SITE_KEYWORDS" class="col-xs-10 col-sm-10 form-control"  value="{$common.SITE_KEYWORDS.value|default=''}" type="text">
				</div>
			</div>
			</div>
			
<!-- 			<div class="form-group">
				<label class="col-sm-2 control-label" for="input-tag2">
					网站slogan
				</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="SITE_SLOGAN" class="col-xs-10 col-sm-10 form-control"  value="{$common.SITE_SLOGAN.value|default=''}" type="text">
				</div>
			</div>
			</div> -->
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> 网址 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="SITE_URL" class="col-xs-10 col-sm-10 form-control"  value="{$common.SITE_URL.value|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  备案号</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="SITE_ICP" class="col-xs-10 col-sm-10 form-control"  value="{$common.SITE_ICP.value|default=''}" type="text">
				</div>
			</div>
			</div>
			
			 <div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  客服电话</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="kefu_tel" class="col-xs-10 col-sm-10 form-control"  value="{$common.kefu_tel.value|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  售后电话</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="shouhou_tel" class="col-xs-10 col-sm-10 form-control"  value="{$common.shouhou_tel.value|default=''}" type="text">
				</div>
			</div>
			</div> 
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  客服QQ</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="kefu_qq" class="col-xs-10 col-sm-10 form-control"  value="{$common.kefu_qq.value|default=''}" type="text">
				</div>
			</div>
			</div> 
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  搜索关键字(用空格隔开)</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="search_key" class="col-xs-10 col-sm-10 form-control"  value="{$common.search_key.value|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">
				<span title="" data-toggle="tooltip" data-original-title="修改此处需要修改路由文件中的对应值">后台入口地址</span>	
				</label>
				
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="admin_login_url" class="col-xs-10 col-sm-10 form-control"  value="{$common.admin_login_url.value|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> 站点状态</label>
			<div class="col-sm-10">
				<div class="clearfix">					
						<label class="radio-inline"><input <?php if($common['WEB_SITE_CLOSE']['value']==1){echo ' checked="checked"';} ?> type="radio" value="1" name="WEB_SITE_CLOSE">开启</label>	
						<label class="radio-inline"><input <?php if($common['WEB_SITE_CLOSE']['value']==0){echo ' checked="checked"';} ?> type="radio" value="0" name="WEB_SITE_CLOSE">关闭</label>				
				</div>
			</div>
			</div>
			
			
		</div>
		<div class="form-group">
			<label class="col-sm-1 control-label no-padding-left"> </label>	
			<div class="col-sm-11">
				<button form="form" type="submit" id="send"  class="btn btn-sm btn-primary">提交</button>		
			</div>
		</div>
	</div>
</div>
{/block}
{block name="javascript"}
<script>

$('#send').click(function(){
	$.post(
		"{:url('Settings/save')}",
		$('input[type=\'text\'],input[type=\'hidden\'],input[type=\'radio\']:checked,textarea'),
		function(d){
			art.dialog({
					content:d.success,
					lock: true,
					ok: function () {	 		
				 	  reloadPage(window);    	
				      return false;
				    }
				});	
		}
	);
});
</script>	
{/block}